package com.itheima.service.impl;

import com.itheima.dao.AccountDao;
import com.itheima.pojo.Account;
import com.itheima.service.AccountService;

import java.util.List;

public class AccountServiceImpl implements AccountService {
    private AccountDao accountDao;

    public void setAccountDao(AccountDao accountDao) {
        this.accountDao = accountDao;
    }



    @Override
    public Account findAccountByID(Integer id) {
        Account account = accountDao.findAccountByID(id);
        return account;
    }

    @Override
    public void transferMoney(int inId, int outId, double money) {
        accountDao.transferIn(inId,money);
        int i = 10/0;
        accountDao.transferOut(outId,money);
    }


}
